<?php if (is_category()) { ?>

<h2><?php single_cat_title(); ?>'s archives</h2>

<?php } else if (is_archive()) { ?>

<h2>
<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
<?php /* If this is a category archive */ if (is_day()) { ?>
Archive for <?php the_time('F jS, Y'); ?>
<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
Archive for <?php the_time('F, Y'); ?>
<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
Archive for <?php the_time('Y'); ?>
<?php } ?>
</h2>

<?php } else if (is_search()) { ?>

<h2>Search Result For &quot; <?php the_search_query(); ?> &quot;</h2>

<?php } ?>